package com.zzptc.zzsgz.bdsjws.activities;

import android.content.Intent;
import android.os.Bundle;

import com.zzptc.zzsgz.bdsjws.R;
import com.zzptc.zzsgz.bdsjws.activities.base.BaseActivity;
import com.zzptc.zzsgz.bdsjws.fragments.ShowAllContactFragment;
import com.zzptc.zzsgz.bdsjws.utils.MyUtil;
import com.zzptc.zzsgz.bdsjws.vo.Contact;

import java.util.List;

import butterknife.OnClick;

public class AddContactsActivity extends BaseActivity {
    ShowAllContactFragment showAllContactFragment;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public int getContentXML() {
        return R.layout.activity_add_contacts;
    }

    @Override
    public void initData() {
//在Fragment中绑定数据源 由内容提供者 查询 联系人信息

 //      List<Contact> listContact= MyUtil.getAllContacts();
        //绑定RecycleView
        //用fragment替换Framelayout

        if (showAllContactFragment==null){
            showAllContactFragment=new ShowAllContactFragment();

        }
        getFragmentManager().beginTransaction().replace(R.id.fl_show_contact,showAllContactFragment).addToBackStack("contact").commit();
    }

    @Override
    public void initView() {

    }

    @OnClick(R.id.img_back)
    public void onViewClicked() {
        startActivity(new Intent(this,FamilysosActivity.class));
    }
}
